package org.example;

import org.example.service.MyService;
import org.example.service.TestService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DIApp {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext cxt=new ClassPathXmlApplicationContext("spring.xml");
        cxt.registerShutdownHook();
        MyService myService = (MyService) cxt.getBean("myService");
        myService.getMyDaoInfo();

        TestService testService= (TestService) cxt.getBean("testService");
        testService.get();
    }
}
